package com.shop.vuedemo.exception;

import lombok.Getter;

/**
 * projectName: vueDemo
 * create on 2021/11/14 11:26
 *
 * @author yanbl
 * @Description : 系统异常
 */
@Getter
public enum SysErrorType implements ErrorType{

    SYSTEM_ERROR("-1", "系统异常"),
    SYSTEM_BUSY("000001", "系统繁忙,请稍候再试"),

    GATEWAY_NOT_FOUND_SERVICE("010404", "服务未找到"),
    GATEWAY_ERROR("010500", "网关异常"),
    GATEWAY_CONNECT_TIME_OUT("010002", "网关超时"),

    ARGUMENT_NOT_VALID("020000", "请求参数校验不通过"),
    INVALID_TOKEN("020001", "无效token"),
    UPLOAD_FILE_SIZE_LIMIT("020010", "上传文件大小超过限制"),

    DUPLICATE_PRIMARY_KEY("030000","唯一键冲突");

    private String code;

    private String message;

    SysErrorType(String code, String message) {
        this.code = code;
        this.message = message;
    }
}
